<?php
session_start();
class cadastroDisciplina extends Tpage{

	public function saveRecord($sender, $param){
		$disciplina = new disciplinaRecord();
		
		$disciplina->FKCodLongUsuario = $_SESSION['idUsuario'];;
		$disciplina->StrDisciplina = $this->disciplina->Text;
		$disciplina->PKCodStrDisciplina = $this->codDisciplina->Text;
		
		
		$disciplina->save();
		
		$this->mensagen->Text ="cadastro efetuado com sucesso";
		$this->disciplina->Text = "";
		$this->codDisciplina->Text = "";
		$this->panel1->render($param->NewWriter);
	
	}
	
public function onLoad($param)
	{
		parent::onLoad($param);
		if(!$this->IsPostBack)
		{

			$this->usuarioLogado->Text = $_SESSION['usuario'];
		}
			
	}
}
?>